﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StudentInfoSystem.Core.Utils;

public class OperationResult
{
    public bool IsSuccess { get; }
    public string Message { get; }

    private OperationResult(bool success, string message)
    {
        IsSuccess = success;
        Message = message;
    }

    public static OperationResult Success(string message = "")
        => new OperationResult(true, message);

    public static OperationResult Failure(string message)
        => new OperationResult(false, message);
}
